/**
 * api接口的统一出口
 */
// 合并所有api
// import dictionaryManagement from '@/views/dictionaryManagement/server/index' // 字典管理
import login from '@/views/api/login' // 登录
import user from '@/views/api/user'
import file from '@/views/api/file'
import firm from '@/views/api/firm'
import hall from '@/views/api/hall'
import teamPerson from '@/views/api/teamPerson'
import canlender from '@/views/api/canlender'
import active from '@/views/api/active'
import funds from '@/views/api/funds'
import homepage from '@/views/api/homepage'


const serverApi = {
  // ...dictionaryManagement
  ...login,
  ...user,
  ...file,
  ...firm,
  ...hall,
  ...teamPerson,
  ...canlender,
  ...active,
  ...funds,
  ...homepage
}

const install = Vue => {
  if (install.installed) {
    return
  }
  install.installed = true
  Object.defineProperties(Vue.prototype, {
    $api: {
      get () {
        return serverApi
      }
    }
  })
}
// 导出所有接口
export default install
